package com.ice.work.moment.facade.socket.mapper;

import com.ice.work.moment.facade.socket.params.AckParam;
import com.ice.work.moment.facade.socket.params.LoginParam;
import com.ice.work.moment.facade.socket.params.LogoutParam;
import com.ice.work.moment.facade.socket.request.AckRequest;
import com.ice.work.moment.facade.socket.request.LoginRequest;
import com.ice.work.moment.facade.socket.request.LogoutRequest;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @Description 参数转换
 * @Author DELL
 * @Create 2019-04-25
 * @Since 1.0.0
 */
@Mapper
@SuppressWarnings("all")
public interface ParamConvertMapper {
    ParamConvertMapper INSTANCE = Mappers.getMapper(ParamConvertMapper.class);

    /**
     * to LoginParam
     *
     * @param request
     * @return
     */
    LoginParam toParam(LoginRequest request);

    /**
     * to AckParam
     *
     * @param request
     * @return
     */
    AckParam toParam(AckRequest request);

    /**
     * to LogoutParam
     *
     * @param request
     * @return
     */
    LogoutParam toParam(LogoutRequest request);

}
